
<template>
    <div class="l">
        <Left :init="1" @add="add" ref="myLeft"></Left>
        <Right :init="5" @add="add" ref="myRight"></Right>
    </div>
</template>
  
<script>
import Left from '@/components/Left.vue'
import Right from '@/components/Right.vue'
export default {
components:{
    Left,
    Right
},
methods:{
    add(val){
        this.$emit('add',val)
    }
}
}
</script>
  
<style lang="less">
.l{
    display: flex;
    flex: 1;
}
</style>